# CMakeLists.txt for the vtkFlRWI Cone3 example
# copyright 2004 by Charl P. Botha http://cpbotha.net/
# $Id: CMakeLists.txt 66 2004-06-08 12:48:33Z cpbotha $

# Use cmake on any platform supported by VTK to create a build environment
# for this example.  Alternatively, but not recommended, modify and make use
# of the Makefile.vtk3 or Makefile.vtk4 example makefiles for GNU C++

PROJECT(Cone3)

# first we have to find VTK
FIND_PACKAGE(VTK)
IF(VTK_FOUND)
  INCLUDE(${VTK_USE_FILE})
ENDIF(VTK_FOUND)

# then FLTK
FIND_PACKAGE(FLTK)
IF(FLTK_FOUND)
  INCLUDE_DIRECTORIES(${FLTK_INCLUDE_DIR})
ENDIF(FLTK_FOUND)

# then vtkFlRenderWindowInteractor.h and .cxx
FIND_PATH(VTK_FL_RWI_H_PATH vtkFlRenderWindowInteractor.h)
FIND_PATH(VTK_FL_RWI_CXX_PATH vtkFLRenderWindowInteractor.cxx)

IF(NOT VTK_FL_RWI_H_PATH)
   MESSAGE(FATAL_ERROR "Please enter the path of vtkFlRenderWindowInteractor.h")
ENDIF(NOT VTK_FL_RWI_H_PATH)

IF(NOT VTK_FL_RWI_CXX_PATH)
   MESSAGE(FATAL_ERROR "Please enter the path of vtkFlRenderWindowInteractor.cxx")
ENDIF(NOT VTK_FL_RWI_CXX_PATH)

# add the vtkFlRenderWindowInteractor.h path to the include directories
INCLUDE_DIRECTORIES(${VTK_FL_RWI_H_PATH})

# remember to actually build and link with vtkFlRenderWindowInteractor.cxx
ADD_EXECUTABLE(Cone3 Cone3.cxx
${VTK_FL_RWI_CXX_PATH}/vtkFlRenderWindowInteractor.cxx)

TARGET_LINK_LIBRARIES(Cone3 vtkRendering ${FLTK_LIBRARIES})
